/*
 * trace_LoopStackInfo.h
 *
 *  Created on: 2012/08/07
 *      Author: guanxiaoying
 */

#ifndef TRACE_LOOPSTACKINFO_H_
#define TRACE_LOOPSTACKINFO_H_
/*
 * the stack of LOOP_INFO( for tracing )( stCmdLoopInfoAccess ).
 * Push some variables in stCmdCurrTraceInfo to stack before entering a loop.
 * Pop the value to stCmdCurrTraceInfo after exiting the loop.
*/
typedef struct _TRLOOPSTACKINFOACCESS{
	BOOL (*clear)( VOID );
	BOOL (*alloc)( AST );
	AST  (*getMax)( VOID );
	/* property below: current loop  */
	ACCESS_IDX_FIELD loop;
	/* property below: the number of loop-exit(stCmdLoopExitAccess)
	 * that already exist before entering a new loop.
	 * when tracing in the new loop, DONOT see the old  loop-exit(stCmdLoopExitAccess)  */
	ACCESS_IDX_FIELD loopExitStkBottom;
	/* property below: the number of path-stack
	 * that already exist before entering a new loop
       when tracing in the new loop, DONOT see the old path-stack(stTrPathStkAccess)  */
	ACCESS_IDX_FIELD pathStkBottom;
	/* property below: the status about loop before tracing in the new loop.
	 *   LOOP_FLG_NONE: not in a loop.
	 *   LOOP_FLG_IN:   in a loop.  */
	ACCESS_U2_FIELD  loopFlg;
}TRLOOPSTACKINFOACCESS;

extern const TRLOOPSTACKINFOACCESS stTrLoopStkAccess;

#endif /* TRACE_LOOPSTACKINFO_H_ */
